import { request } from '@/utils/request'

// 查询车辆保险列表
export function listCarInsurance(query) {
  return request({
    url: '/system/carInsurance/list',
    method: 'get',
    params: query
  })
}

// 查询待续保车辆列表
export function listNeedRenewInsurance(query) {
  return request({
    url: '/system/carInsurance/needRenewInsuranceList',
    method: 'get',
    params: query
  })
}

// 查询车辆保险详细
export function getCarInsurance(id) {
  return request({
    url: '/system/carInsurance/' + id,
    method: 'get'
  })
}

// 新增车辆保险
export function addCarInsurance(data) {
  return request({
    url: '/system/carInsurance',
    method: 'post',
    data: data
  })
}

// 修改车辆保险
export function updateCarInsurance(data) {
  return request({
    url: '/system/carInsurance',
    method: 'put',
    data: data
  })
}

// 删除车辆保险
export function delCarInsurance(id) {
  return request({
    url: '/system/carInsurance/' + id,
    method: 'delete'
  })
}
